<template>
  <div class="load-box" v-show="loading">
    <div class="loading"></div>
  </div>
</template>

<script>
export default {
  props: {
    loading: {
      type: Boolean,
      default: false,
    },
  },
};
</script>

<style scoped>
.load-box {
  background-color: rgba(0, 0, 0, 0.5);
}

.loading {
  width: 45px;
  height: 45px;
  display: block;
  background: transparent
    url("");
  background-size: 100%;
  margin: auto;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}
</style>